package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * 婚姻类型
 */
@Getter
public enum MaritaTypeEnum {
    WH_MARIRA(0, "未婚"),
    DUWY_MARIRA(1, "短婚未孕"),
    LYYZVNSB_MARIRA(2, "离异"),
    OTHER_MARIRA(3, "其他"),
    ;

    private int code;

    private String desc;

    MaritaTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MaritaTypeEnum getDscByType(Integer type) {
        for (MaritaTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
